<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // filter 过滤 
        var arr = [2,3,4,5,6];
        // var arr1 = arr.filter(function(item){
        //     return item >= 5;
        // })
        var arr1 = arr.filter(item=>item >= 5)
        console.log(arr1);
        // some 一组元素中，只要有一个满足条件，就返回true 
        var arr = [2,3,4,5,6];
        arr.some(item=>item>=5)
        // forEach 
        var arr = [2,3,4,5,6];
        arr.forEach(item=>{
            console.log(item)
        })

        
    </script>
</body>
</html>